class CallByValue
{
	public void changeValue(int i)
	{
		i = 13;
	}
}
class CallByReference
{
	public void changeValue(int[] i)
	{
		i[0] = 13;
	}
}
public class Test
{
	public static void main(String args[])
	{
		int val1 = 36;
		CallByValue cbv = new CallByValue();
		System.out.println("call by value");
		System.out.println("before change=" + val1);
		cbv.changeValue(val1);
		System.out.println("after change=" + val1);
		
		int[] val2 = new int[1];
		val2[0] = 36;
		CallByReference cbr = new CallByReference();
		System.out.println("call by reference");
		System.out.println("before change=" + val2[0]);
		cbr.changeValue(val2);
		System.out.println("after change=" + val2[0]);
	}
}
